---
layout: default
---
postCollection = getCollection('documents').findAllLive({$or: [{layout: 'post'}, {layout: 'link'}]}, {date: -1})

div(class='container')
  div(class='sixteen columns doc-section')
    article
      h1= document.title
      span(class='postdate')= moment(document.date).utc().format('MMMM Do, YYYY')
      if document.comments
        span.comment_reactions 
          a(href="#{site.url}#{document.url}#disqus_thread") Comments
      != content

            
    footer
      .footer-nav
        p.meta
          for item, index in postCollection.toJSON()
            if item.id == document.id
              if index >= 1
                a.article_nav.right(href="#{postCollection.models[index-1].attributes.url}")= postCollection.models[index-1].attributes.title + '»'
              if index < postCollection.length - 1
                a.article_nav.left(href="#{postCollection.models[index+1].attributes.url}")= '«' + postCollection.models[index+1].attributes.title 
              break
    //- != partial('footer.html.jade')
    #author
      a(href="http://twitter.com/markgrovs", id="author-image")
        img(alt="Mark Groves Image", src="http://www.gravatar.com/avatar/8d5c3e752e24437e4c24920e569970e0.png", height="80", width="80")
      #author-bio
        h5 Written by 
          a(href="http://twitter.com/markgrovs") Mark Groves
        p 
          | Mark Groves is a program manager and agile practitioner, currently practicing lean and striving towards continuous deployment. 
          | If you like what you read please 
          a(href="http://feeds.feedburner.com/markgroves") subscribe
          |  and follow Mark on 
          a(href="http://twitter.com/markgrovs") Twitter
    if document.comments 
      != partial('comments.html.jade')
